// 自己定义的确认按钮

// 关闭VSCode非必要报错
// ignore_for_file: must_be_immutable, camel_case_types

import 'package:flutter/material.dart';

class MyButton_Confirmed extends StatelessWidget {
  final String text;
  VoidCallback onPressed;
  MyButton_Confirmed({
    super.key,
    required this.text,
    required this.onPressed,
  });

  @override
  Widget build(BuildContext context) {
    return MaterialButton(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(15),
      ),
      onPressed: onPressed,
      color: Colors.deepPurple[200],
      child: Text(
        text,
        style: TextStyle(
          fontSize: 20,
          color: Colors.white,
        ),
      ),
    );
  }
}